home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970326-19970626 / 000031_news@columbia.edu _Tue Apr 1 15:55:33 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id PAA27401
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 1 Apr 1997 15:55:32 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id PAA29015
  7.     for kermit.misc@watsun; Tue, 1 Apr 1997 15:55:32 -0500 (EST)
  8. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: Assigning a script to a key...
  12. Date: 1 Apr 1997 20:55:29 GMT
  13. Organization: Columbia University
  14. Lines: 50
  15. Message-ID: <5hrso1$q7q$1@apakabar.cc.columbia.edu>
  16. References: <5hrqhh$9at$1@news.vanderbilt.edu>
  17. NNTP-Posting-Host: watsun.cc.columbia.edu
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:6846
  19.  
  20. In article <5hrqhh$9at$1@news.vanderbilt.edu>,
  21.  <don.eddleman@mcmail.vanderbilt.edu> wrote:
  22. : I would like to assign a script to a key.  It appears that this is not
  23. : possible with the set key command.
  24. :
  25. Sure, it's possible.  (And knowing who you are, I deduce you are talking
  26. about Kermit 95 :-)  But what you are really asking is whether it is
  27. possible to have a mixture of scripts (macros) and "kverbs" in a key
  28. definition.  And yes, that's possible too.
  29.  
  30. : The script needs to set printer to a file, do a Kdump of the current
  31. : screen, and then set the printer back to PRN.  As you can see, what I
  32. : really want to do is get a screen scrape of the current emulator screen
  33. : when a user hits a specially defined key.  Is there another way to do
  34. : this?
  35. The obvious way to do this would be:
  36.  
  37.   define x1 set printer screen.txt
  38.   define x2 set printer, connect
  39.   set key \368 \Kx1\Kdump\Kx2
  40.  
  41. (\Kdump is a built-in Kverb; \Kx1 and \Kx2 are macros masquerading as
  42. Kverbs.)  Unfortunately, this doesn't work because at the time the \Kdump
  43. verb is executed, the command screen is active instead of the terminal
  44. screen.  That is, \Kdump is executing in the wrong context.  I can't think
  45. of any way to force it to execute in the other context.  You might think:
  46.  
  47.   define x1 set printer screen.txt, connect
  48.   define x2 set printer, connect
  49.   set key \368 \Kx1\Kdump\Kx2
  50.  
  51. would do it, but for some reason it doesn't.  However, you can do something
  52. like this:
  53.  
  54.   define x1 set printer screen.txt, connect
  55.   define x2 set printer, connect
  56.   set key \368 \Kx1
  57.   set key \369 \Kx2
  58.  
  59. In this case the F1 key sets the printer to be the file, SCREEN.TXT, and
  60. F2 sets it back to the default (PRN).
  61.  
  62. The Alt-p key has \Kdump assigned to it by default.  So:
  63.  
  64.   Alt-p      Prints to current SET PRINTER device or file
  65.   F1 Alt-p   Prints to SCREEN.TXT file
  66.   F2 Alt-p   Prints to PRN
  67.  
  68. - Frank